
#ld_params = -L /usr/lib/x86_64-linux-gnu \
			-lvulkan -lglfw 


#ld_params = /usr/lib/x86_64-linux-gnu/libvulkan.so \
			/usr/lib/x86_64-linux-gnu/libglfw.so

CFLAGS = -std=c++17 -O2 -g 


libs = glfw3 vulkan # dl pthread X11 Xxf86vm Xrandr Xi

compile_params = $(shell  pkg-config --cflags  $(libs))

ld_params = $(shell pkg-config --cflags --libs  $(libs)) 

%.o : %.cpp
	g++ -c  $< -o $@ $(CFLAGS)

# 保留所有 .o 文件
.PRECIOUS: %.o       

%.elf : %.o
	g++   $< $(ld_params) -o $@ 

demo :demo.elf


hello_triangle : HelloTriangleApplication.elf

all :hello_triangle

clean:
	rm -rf *.o *.elf